// index.js
// 获取应用实例
const App = getApp()
const api = require('../../utils/requst.js').API;
Page({
  data: {
    top:0,
    detail:{},
    choiceList:[{value:1,checked:true,name:'全款支付',pay:566},{value:2,checked:false,name:'定价支付',pay:56}]
  },
  onLoad(e) {
    let top =App.globalData.systemInfo.statusBarHeight + App.globalData.menuButton.height + (App.globalData.menuButton.top - App.globalData.systemInfo.statusBarHeight)*2
   
    this.setData({top:top})
  },
  radioChange: function (e) {
    let value = e.detail.value;
   var choiceList =  this.data.choiceList
    for (var i = 0, len = choiceList.length; i < len; ++i) {
      choiceList[i].checked = choiceList[i].value == e.detail.value;
    }
    this.setData({
      choiceList: choiceList
    });
    
  }
})
